home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
dev
/
gcc
/
ixemsdk.lha
/
man
/
cat3
/
newtzset.0
< prev
next >
Wrap
Text File
|
1996-09-02
|
9KB
|
199 lines
NEWTZSET(3) NEWTZSET(3)
NNAAMMEE
tzset - initialize time conversion information
SSYYNNOOPPSSIISS
vvooiidd ttzzsseett(())
cccc ...... --llzz
DDEESSCCRRIIPPTTIIOONN
_T_z_s_e_t uses the value of the environment variable TTZZ to set
time conversion information used by _l_o_c_a_l_t_i_m_e. If TTZZ does
not appear in the environment, the best available approxi-
mation to local wall clock time, as specified by the
_t_z_f_i_l_e(5)-format file llooccaallttiimmee in the system time conver-
sion information directory, is used by _l_o_c_a_l_t_i_m_e. If TTZZ
appears in the environment but its value is a null string,
Coordinated Universal Time (UTC) is used (without leap
second correction). If TTZZ appears in the environment and
its value is not a null string:
if the value begins with a colon, it is used as a
pathname of a file from which to read the time con-
version information;
if the value does not begin with a colon, it is
first used as the pathname of a file from which to
read the time conversion information, and, if that
file cannot be read, is used directly as a specifi-
cation of the time conversion information.
When TTZZ is used as a pathname, if it begins with a slash,
it is used as an absolute pathname; otherwise, it is used
as a pathname relative to a system time conversion infor-
mation directory. The file must be in the format speci-
fied in _t_z_f_i_l_e(5).
When TTZZ is used directly as a specification of the time
conversion information, it must have the following syntax
(spaces inserted for clarity):
_s_t_d_o_f_f_s_e_t[_d_s_t[_o_f_f_s_e_t][,,_r_u_l_e]]
Where:
_s_t_d and _d_s_t Three or more bytes that are the
designation for the standard (_s_t_d)
or summer (_d_s_t) time zone. Only _s_t_d
is required; if _d_s_t is missing, then
summer time does not apply in this
locale. Upper- and lowercase let-
ters are explicitly allowed. Any
characters except a leading colon
(::), digits, comma (,,), minus (--),
plus (++), and ASCII NUL are allowed.
1
NEWTZSET(3) NEWTZSET(3)
_o_f_f_s_e_t Indicates the value one must add to
the local time to arrive at Coordi-
nated Universal Time. The _o_f_f_s_e_t
has the form:
_h_h[::_m_m[::_s_s]]
The minutes (_m_m) and seconds (_s_s)
are optional. The hour (_h_h) is
required and may be a single digit.
The _o_f_f_s_e_t following _s_t_d is
required. If no _o_f_f_s_e_t follows _d_s_t,
summer time is assumed to be one
hour ahead of standard time. One or
more digits may be used; the value
is always interpreted as a decimal
number. The hour must be between
zero and 24, and the minutes (and
seconds) -- if present -- between
zero and 59. If preceded by a
``--'', the time zone shall be east
of the Prime Meridian; otherwise it
shall be west (which may be indi-
cated by an optional preceding
``++'').
_r_u_l_e Indicates when to change to and back
from summer time. The _r_u_l_e has the
form:
_d_a_t_e//_t_i_m_e,,_d_a_t_e//_t_i_m_e
where the first _d_a_t_e describes when
the change from standard to summer
time occurs and the second _d_a_t_e
describes when the change back hap-
pens. Each _t_i_m_e field describes
when, in current local time, the
change to the other time is made.
The format of _d_a_t_e is one of the
following:
JJ_n The Julian day _n
(1 <= _n <= 365). Leap
days are not counted; that
is, in all years --
including leap years --
February 28 is day 59 and
March 1 is day 60. It is
impossible to explicitly
refer to the occasional
February 29.
2
NEWTZSET(3) NEWTZSET(3)
_n The zero-based Julian day
(0 <= _n <= 365). Leap
days are counted, and it
is possible to refer to
February 29.
MM_m.._n.._d The _d_'th day (0 <= _d <= 6)
of week _n of month _m of
the year (1 <= _n <= 5,
1 <= _m <= 12, where week 5
means ``the last _d day in
month _m'' which may occur
in either the fourth or
the fifth week). Week 1
is the first week in which
the _d_'th day occurs. Day
zero is Sunday.
The _t_i_m_e has the same format as _o_f_f_-
_s_e_t except that no leading sign
(``--'' or ``++'') is allowed. The
default, if _t_i_m_e is not given, is
0022::0000::0000.
If no _r_u_l_e is present in TTZZ, the rules specified by the
_t_z_f_i_l_e(5)-format file ppoossiixxrruulleess in the system time con-
version information directory are used, with the standard
and summer time offsets from UTC replaced by those speci-
fied by the _o_f_f_s_e_t values in TTZZ.
For compatibility with System V Release 3.1, a semicolon
(;;) may be used to separate the _r_u_l_e from the rest of the
specification.
If the TTZZ environment variable does not specify a
_t_z_f_i_l_e(5)-format and cannot be interpreted as a direct
specification, UTC is used.
FFIILLEESS
/usr/local/etc/zoneinfo time zone information
directory
/usr/local/etc/zoneinfo/localtime local time zone file
/usr/local/etc/zoneinfo/posixrules used with POSIX-style
TZ's
/usr/local/etc/zoneinfo/GMT for UTC leap seconds
If //uussrr//llooccaall//eettcc//zzoonneeiinnffoo//GGMMTT is absent, UTC leap seconds
are loaded from //uussrr//llooccaall//eettcc//zzoonneeiinnffoo//ppoossiixxrruulleess.
SSEEEE AALLSSOO
getenv(3), newctime(3), newstrftime(3), time(2), tzfile(5)
3